package tech.aistar.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import tech.aistar.entity.Biography;
import tech.aistar.service.IBiographyService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Controller
@RequestMapping("/user")
public class jianliController {
    @Autowired
    private IBiographyService biographyService;

    @GetMapping("/jianli")
    public String jianliView(HttpServletRequest request){
        //获取后台所有的产品的数据
        List<Biography> biographyList = biographyService.findAll(null,null);

        //放入到request作用域中
        request.setAttribute("biographyList",biographyList);
        return "user/jianli";
    }
}
